public class CoffeeMa extends Colleague{
    public CoffeeMa(String name, Mediator mediator) {
        super(name, mediator);
        mediator.resister(name,this);
    }

    public void SendCoffeeMa(int stateChange){
        sendMessage(stateChange);
    }

    @Override
    public void sendMessage(int stateChange) {
        this.getMediator().getMessage(stateChange,this.getName());
    }

    public void openCoffeeMa(){
        System.out.println("咖啡机正在打开煮咖啡---------");
    }
}
